# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libopensles-standalone
pkgver=0_git20231019
pkgrel=2
_commit="6e6e8e5bfa9f53deaa947e8ec4f1a70b892b764f"
pkgdesc="A lightly patched version of Google's libOpenSLES implementation"
url="https://gitlab.com/android_translation_layer/libopensles-standalone"
arch="x86_64 aarch64"
license="Apache-2.0"
makedepends="
	libsndfile-dev
	meson
	openjdk8-jdk
	sdl2-dev
	"
subpackages="$pkgname-dev $pkgname-dbg"
source="https://gitlab.com/android_translation_layer/libopensles-standalone/-/archive/$_commit/libopensles-standalone-$_commit.tar.gz"
options="!check" # No tests
builddir="$srcdir/libopensles-standalone-$_commit"

build() {
	abuild-meson \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
9f26cf3814c1066c8e670753cb2ce8ee6781a656b91d3745df621feb905df60139254ec7baa5257548de538a6c4ace8a414cac699e44e02a15777d8c20c68577  libopensles-standalone-6e6e8e5bfa9f53deaa947e8ec4f1a70b892b764f.tar.gz
"
